package com.youngball.business.dao.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.ValueOperations;

import javax.annotation.Resource;

/**
 * Created by admin on 2015/9/6.
 */
public class BaseRedisDao<K,T> {

    @Resource(name = "redisTemplate")
    private RedisTemplate<K,T> redisTemplate;

    public JedisConnectionFactory getJedisConnectionFactory() {
        return jedisConnectionFactory;
    }

    public void setJedisConnectionFactory(JedisConnectionFactory jedisConnectionFactory) {
        this.jedisConnectionFactory = jedisConnectionFactory;
    }

    @Autowired

    private JedisConnectionFactory jedisConnectionFactory;
    public ValueOperations<K, T> getvOps() {
        return vOps;
    }

    public void setvOps(ValueOperations<K, T> vOps) {
        this.vOps = vOps;
    }

    @Resource(name = "redisTemplate")
    private ValueOperations<K, T> vOps;



    public RedisTemplate<K, T> getRedisTemplate() {
        return redisTemplate;
    }

    public void setRedisTemplate(RedisTemplate<K, T> redisTemplate) {
        this.redisTemplate = redisTemplate;
    }
}
